/**
 *  TinyPasswordManager
 *  Copyright (C) 2008 Gross David <gdavid.devel@gmail.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef FIREFOX_PASSWORD_DIALOG_H
#define FIREFOX_PASSWORD_DIALOG_H

#include <QtGui/QDialog>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QLineEdit>

#include <string>

/*!
 * \class FirefoxPasswordDialog
 * \brief Dialog class for Firefox master password
 *
 * \author Vinet Guillaume <vinet.guillaume@gmail.com>
 * \author Gross David <gdavid.devel@gmail.com>
 * \date 09/10/2009
 */
class FirefoxPasswordDialog : public QDialog {
    Q_OBJECT

public:
    //! Create a FirefoxPasswordDialog object.
    /*!
     * \param parent the QWidget object parent.
     */
    explicit FirefoxPasswordDialog(QWidget *parent = 0);

    //! Destroy a FirefoxPasswordDialog object.
    virtual ~FirefoxPasswordDialog();
    
    //! Return the Firefox master password.
    /*!
     *  \return the Firefox master password.
     */
    std::string getMasterPassword() const;
    
private:
    //! Create connections between signals and slots.
    void createConnections();
    
    //! Instantiate widgets of the dialog;
    void init();
    
    //! "OK" button.
    QPushButton *m_buttonOk;
    
    //! "Cancel" button.
    QPushButton *m_buttonCancel;
    
    //! The password entered by the user.
    QLineEdit *m_editPassword;
};

#endif

    